home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_vol_enddoor.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  137 lines

  1. # Jones 3D Cog Script
  2. #
  3. # vol_EndDoor.cog
  4. #
  5. # Door Script
  6. #
  7. # [cmg]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     
  14.     
  15. #...............MESSAGES....................
  16.     message        startup        
  17.     message        activated    
  18.  
  19. #...............ACTORS....................
  20.     thing        player                                local        
  21.     thing        indyActor                    
  22.     
  23. #...............CAMERAS....................
  24.     thing        endcamPOS                            nolink
  25.     thing        endcamPOS2                            nolink
  26.  
  27. #...............PROPS....................
  28.     thing        door0                                linkID=2        
  29.     thing        door1                                linkID=2
  30.     
  31.     thing        in_finalPOS                            nolink
  32.     thing        fadeplate                            nolink
  33.  
  34. #...............VARS....................
  35.     int            open=0                                local
  36.  
  37. #...............SOUNDS..................
  38.     sound        endtheme=mus_gen_indyrelief.wav        local
  39.  
  40. #...............TRIGGERS....................
  41.     sector        doorsector                            local
  42.  
  43. end
  44. # .................................................................................................
  45. code
  46. startup:
  47.     
  48.     
  49.     ThingFadeAnim(fadeplate, 1.0, 0.0, 0.1, 0);
  50.     player=GetLocalPlayerThing();
  51.  
  52.     # no see adjoins for the door sector
  53.     doorsector = getthingsector(door0);
  54.     SetSectorAdjoins(doorsector, 0);
  55.  
  56. return;
  57.  
  58. # .................................................................................................
  59.  
  60. activated:
  61.     
  62.     if (GetSenderID() != 2) return;
  63.     if (open != 0) return;
  64.     
  65.     open= 1;    # no extra activated messages
  66.     StartCutScene(1);
  67.     
  68.     # restore cam 2
  69.     SetCameraLookInterp(2,0);
  70.     SetCameraPosInterp(2,0);
  71.     Sleep(0.01);
  72.  
  73.     # set up the actor
  74.     MakeMeStop();
  75.     CopyOrientAndPos(player, indyActor);
  76.     CopyPlayerHolsters(player, indyActor);
  77.     SetThingFlags(player, 0x80000);
  78.     ClearThingFlags(indyActor, 0x80000);
  79.     PlayMode(indyActor, 60, 1);
  80.     
  81.     # get camera2 to 3/4 shot 
  82.     SetCameraFocus(2, endcamPOS);
  83.     SetCameraSecondaryFocus(2, indyActor);
  84.     SetCurrentCamera(2);
  85.     
  86.     SetSectorAdjoins(doorsector, 1);
  87.     Rotate(door0, -90, 1, 2.0);
  88.     Rotate(door1, 90, 1, 2.0);
  89.  
  90.     Sleep(2.5);
  91.     # move the actor into the hall
  92.     AISetLookThingEyeLevel(indyActor, in_finalPOS);
  93.     AISetMoveSpeed(indyActor, 1.1);
  94.     AISetMoveThing(indyActor, in_finalPOS, 0);
  95.  
  96.     PlaySoundLocal(endtheme, 1.0, 0, 0x0, 0);
  97.  
  98.     # move the camera back with pos interp
  99.     SetCameraPosInterp(2,1);
  100.     SetCameraInterpSpeed(2, 3);
  101.     Sleep(0.01);
  102.     SetCameraFocus(2, endcamPOS2);
  103.  
  104.     Sleep(4.0);
  105.  
  106.     # fade to black
  107.     ThingFadeAnim(fadeplate, 0.0, 1.0, 2.0, 0);
  108.  
  109.     Sleep(3.0);
  110.  
  111.     # clean up the camera
  112.     ResetCameraFOV();
  113.     SetCameraLookInterp(2, 0);
  114.     SetCameraPosInterp(2, 0);
  115.  
  116.     # end it
  117.     EndCutScene();
  118.     JonesEndLevel();
  119.  
  120. return;
  121.  
  122. # .................................................................................................
  123.  
  124.  
  125.     
  126.     
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134. # .................................................................................................
  135. end
  136.  
  137.